ThreeSameTimeForm = Ext.extend(Ext.Window,
{
    constructor : function(a) {
        Ext.applyIf(this, a);
        this.initUIComponents();
        ThreeSameTimeForm.superclass.constructor.call(this, {
            layout : "fit",
            id : this.inputFormName,
            items : yearGridFormPanel,
            modal : true,
            bodyStyle : "padding:2px;",
            buttonAlign : "center",
            buttons : yearGridFormButtons,
            title : "三同时档案信息",
            iconCls : "menu-flowWait",
            width : 620,
            height : 375
        });
    },
    //初始化数据
    initUIComponents : function() {
        createyeargridform({
            operation:this,
            form:{
                saveUrl: __ctxPath+"/constructionproject/saveThreeSameTime.do",
                items:[
                        {
                            id : "threeSameTime.id",
                            name : "threeSameTime.id",
                            xtype : "hidden",
                            value : this.id == null ? "": this.id
                        }, {
                            name : "threeSameTime.years",
                            xtype : "hidden",
                            id : "threeSameTime.years",
                            value : this.years == null ? "" : this.years
                        },{
                           layout:"column",
                           bodyStyle:"padding:5px;",
                           items:[{
                               layout:"form",
                               bodyStyle:"padding:5px;",
                               border:false,
                               columnWidth:.5,
                                   items:[{
                                       xtype:"textfield",
                                       fieldLabel:'文件批复号' + '<font color=red>*</font>',
                                       name:'threeSameTime.fileNo',
                                       maxLength:80,
                                       allowBlank:false,
                                       width:146
                                   }]
                               },{
                                   layout:"form",
                                   bodyStyle:"padding:5px;",
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                       xtype:"textfield",
                                       fieldLabel:'负责人',
                                       name:'threeSameTime.head',
                                       maxLength:80,
                                       width:146
                                   }]
                               },{
                                   layout:"form",
                                   bodyStyle:"padding:5px;",
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                       xtype:"textfield",
                                       fieldLabel:'上报人',
                                       name:'threeSameTime.reportPerson',
                                       maxLength:80,
                                       width:146
                                   }]
                               },{
                                   layout:"form",
                                   bodyStyle:"padding:5px;",
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                       //下拉选型设置
                                           fieldLabel : "所属机构",
                                           hiddenName : "threeSameTime.institution",
                                           xtype : "combo",
                                           mode : "local",
                                           editable : false,
                                           width:146,
                                           triggerAction : "all",
                                           store:new Ext.data.ArrayStore({
                                               id:0,
                                               fields:['id','type'],
                                               data:[ [ "1", "组织部" ],
                                                      [ "2", "财务部" ],
                                                      [ "3", "销售部" ]]
                                           }),
                                           valueField:'type',
                                           displayField:'type',
                                           value:"销售部" 
                                   }]
                               },{
                                   layout:'form',
                                   bodyStyle:"padding:5px;",
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                          xtype:'textfield',
                                          fieldLabel:'上报机构',
                                          name:'threeSameTime.reportingAgency',
                                          maxLength:80,
                                          width:146
                                   }]
                               },{
                                   layout:'form',
                                   bodyStyle:'padding:5px;',
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                       xtype:'datefield',
                                       fieldLabel:'上报时间',
                                       id:'threeSameTime.reportTime',
                                       name:'threeSameTime.reportTime',
                                       format:'y-m-d',
                                       width:146
                                   }]
                               },{
                                   layout:'form',
                                   bodyStyle:"padding:5px;",
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                          xtype:'datefield',
                                          fieldLabel:'办理日期',
                                          id:'threeSameTime.managementDate',
                                          name:'threeSameTime.managementDate',
                                          format:'y-m-d',
                                          width:146
                                   }]
                               },{
                                   layout:'form',
                                   bodyStyle:'padding:5px;',
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                       xtype:'datefield',
                                       fieldLabel:'竣工日期',
                                       id:'threeSameTime.completionDate',
                                       name:'threeSameTime.completionDate',
                                       format:'y-m-d',
                                       width:146
                                   }]
                               }
                            ]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:"form",
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:"textfield", 
                               fieldLabel: '技术服务单位', 
                               name: 'threeSameTime.technicalServiceUnit', 
                               width : 448 
                               }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:"form",
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:"textarea", 
                               fieldLabel: '内容', 
                               name: 'threeSameTime.content', 
                               width : 448 
                               }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:"form",
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:"textarea", 
                               fieldLabel: '上报说明', 
                               name: 'threeSameTime.reportDescription', 
                               width : 448 
                               }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:'form',
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:'textarea',
                               fieldLabel:'备注',
                               name:'threeSameTime.remark',
                               width:448
                               }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:'form',
                               xtype:'fieldset',
                               title:'预评价',  
                               collapsible:true,
                               //默认收起为true，默认为false
                               collapsed : true,
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:'datefield',
                               fieldLabel:'预评价时间',
                               name:'threeSameTime.preassessmentDate',
                               width:146
                               },{
                                   xtype:'textfield',
                                   fieldLabel:'与评价机构',
                                   name:'threeSameTime.preassessmentMechanism',
                                   width:448
                                },{
                                	 xtype:'textarea',
                                     fieldLabel:'预评价内容',
                                     name:'threeSameTime.preassessmentContent',
                                     width:448
                                },{
                               	 xtype:'textarea',
                                 fieldLabel:'预评价备注',
                                 name:'threeSameTime.preassessmentRemark',
                                 width:448
                            }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:'form',
                               xtype:'fieldset',
                               title:'效果评价',  
                               collapsible:true,
                               //默认收起为true，默认为false
                               collapsed : true,
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                                   xtype:'datefield',
                                   fieldLabel:'效果评价时间',
                                   name:'threeSameTime.effectDate',
                                   width:146
                                   },{
                                   xtype:'textfield',
                                   fieldLabel:'效果评价机构',
                                   name:'threeSameTime.effectMechanism',
                                   width:448
                                },{
                               	 xtype:'textarea',
                                 fieldLabel:'效果评价内容',
                                 name:'threeSameTime.effectContent',
                                 width:448
                            },{
                               	 xtype:'textarea',
                                 fieldLabel:'效果评价备注',
                                 name:'threeSameTime.effectRemark',
                                 width:448
                            }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:'form',
                               xtype:'fieldset',
                               title:'验收',  
                               collapsible:true,
                               //默认收起为true，默认为false
                               collapsed : true,
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:'datefield',
                               fieldLabel:'验收时间',
                               name:'threeSameTime.inspectDate',
                               width:146
                               },{
                                   xtype:'textfield',
                                   fieldLabel:'验收机构',
                                   name:'threeSameTime.inspectMechanism',
                                   width:448
                                },{
                                	 xtype:'textarea',
                                     fieldLabel:'验收内容',
                                     name:'threeSameTime.inspectContent',
                                     width:448
                                },{
                                  	 xtype:'textarea',
                                     fieldLabel:'验收结论',
                                     name:'threeSameTime.inspectConclusion',
                                     width:448
                                },{
                               	 xtype:'textarea',
                                 fieldLabel:'验收备注',
                                 name:'threeSameTime.inspectRemark',
                                 width:448
                            }]
                           }]
                       }
			 
               ]
            },
            loadData:{
                getUrl:__ctxPath +"/constructionproject/getThreeSameTime.do",
                preName : "threeSameTime"
            }
        });
    }
});
